package com.csci4448.distributedcomputing;
import com.csci4448.distributedcomputing.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ProjectChooser extends Activity implements OnClickListener {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.projectchooser);
        
        Button queryServer = ((Button) findViewById(R.id.query_server));
        queryServer.setOnClickListener(this);
    }
    public void onClick(View v) {
    	
    	switch (v.getId()) {
    		case R.id.query_server:
                Intent intent = new Intent();
                String url = ((TextView)findViewById(R.id.editText1)).getText().toString();
                intent.putExtra("SERVER_URL", url);
                setResult(RESULT_OK, intent);
                finish();
    		break;
    	}
    }
    
}

